#!/bin/bash

#不并发执行
for ((i = 1; i <= 10; i++)); do
    startTime=`date +%s%N`

    ./bin/mythread $1

    endTime=`date +%s%N`
    c=$((endTime-startTime))
    c=`expr $c / 1000000`

    echo "$i , $c ms">>./result/result1.txt
    
    rm -rf /home/chanyeol/tmp/*
done

#并发执行
for ((i = 1; i <= 10; i++)); do
    startTime=`date +%s%N`

    ./bin/mythreadt $1

    endTime=`date +%s%N`
    c=$((endTime-startTime))
    c=`expr $c / 1000000`

    echo "$i , $c ms">>./result/result2.txt
    
    rm -rf /home/chanyeol/tmp/*
done

